package com.spring.utils.api_v4.controller.ui;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spring.utils.api_v4.util.DoubleSerialize;
import lombok.Data;

/**
 * 部门任务项目
 */
@Data
public class DeptTaskItem {
    private String id;  // 编号
    private String deptName;    // 部门名称
    @JsonSerialize(using = DoubleSerialize.class)
    private double wage;    // 绩效总额
    private int state;   // 状态码
    public String getStateName() {
        switch (state) {
            case 0: return "初始化";
            case 1: return "设置中";
            case 2: return "已完成";
            case -1: return "锁定中";
            default: return  "未知状态";
        }
    }
}
